package com.pro.dao;

import com.pro.entity.Authority;
import com.pro.entity.UserAuthority;
import org.apache.ibatis.annotations.Delete;

import java.util.List;

/**
 * @ClassName: AuthorityMapper
 * @Author: 笑笑
 * @DATE: 2021/11/11
 * @TIME: 下午 04:55
 */
public interface UserAuthorityMapper {
    //查询所有权限信息
    List<Authority> getAllAuthority();

    //根据用户id查询权限信息
    List<Authority> getByUserId(Integer id);

    //添加用户权限信息
    Boolean addUserAuthority(UserAuthority userAuthority);

    //删除用户权限信息
    @Delete("DELETE FROM js_user_authority WHERE user_id = #{userId} AND authority_id = #{authorityId}")
    Boolean DeleteUserAuthority(UserAuthority userAuthority) throws Exception;


}
